<template>
	<view class="th-search-box">
		<input class="input-box" v-model="content" :placeholder="placeholder" :disabled="disabled"></input>
		<view class="search-btn" @tap="search">搜索</view>

	</view>
</template>

<script>
	export default {
		name: "th-search",
		data() {
			return {
				content:''

			};
		},
		props:{
			placeholder:{
				type:String,
				default:'请输入搜索内容'
			},
			disabled:{
				type:Boolean,
				default:true
			}
		},
		methods:{
			search(){
				this.$emit('search',{
					data:this.content
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.th-search-box {
		width: 100%;
		height: 68rpx;
		background: #F6F7FB;
		border-radius: 34rpx;
		padding-left: 46rpx;
		padding-right: 4rpx;
		display: flex;
		align-items: center;
		.input-box{
			font-size: 28rpx;
			font-family: PingFang-SC-Medium, PingFang-SC;
			font-weight: 500;
			color: #999999;
			line-height: 40rpx;
			flex: 1;
		}
		.search-btn{
			width: 112rpx;
			height: 60rpx;
			background: linear-gradient(90deg, #FE8066 0%, #FC5D24 100%);
			border-radius: 34rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 28rpx;
			font-family: PingFang-SC-Medium, PingFang-SC;
			font-weight: 500;
			color: #FFFFFF;
		}

	}
</style>